package com.hospital.hospitalsystem.modules.login.service;

import com.hospital.hospitalsystem.modules.hospital.dto.DoctorListReq;
import com.hospital.hospitalsystem.modules.hospital.dto.DoctorListRsp;
import com.hospital.hospitalsystem.modules.login.dao.entity.DoctorEntity;
import com.hospital.hospitalsystem.modules.login.dao.mapper.DoctorMapper;
import com.hospital.hospitalsystem.modules.user.dto.BookCaseReq;
import com.hospital.hospitalsystem.modules.user.dto.BookTimeResultExt;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import tk.mybatis.mapper.entity.Example;

import java.util.List;

/**
 * @author qiancheng@cqxyy.net
 * @date 2023/2/22
 */
@Component
public class DoctorService {
    @Autowired
    private DoctorMapper doctorMapper;

    public DoctorEntity selectOneByExample(Example example){
        return doctorMapper.selectOneByExample(example);
    }

    public List<DoctorEntity> selectByExample(Example example){
        return doctorMapper.selectByExample(example);
    }

    public void insertSelective(DoctorEntity doctorEntity){
        doctorMapper.insertSelective(doctorEntity);
    }

    public void updateByExampleSelective(DoctorEntity doctorEntity,Example example){
        doctorMapper.updateByExampleSelective(doctorEntity,example);
    }

    public List<BookTimeResultExt> selectBookTimeByUuid(BookCaseReq req) {
        return doctorMapper.selectBookTimeByUuid(req);
    }

    public List<DoctorListRsp> selectDoctorList(DoctorListReq req) {
        return doctorMapper.selectDoctorList(req);
    }
}
